home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 6183 < prev    next >
Encoding:
Text File  |  1996-08-05  |  1.4 KB  |  66 lines

  1. Newsgroups: comp.lang.c++
  2. Path: sunserver1.aston.ac.uk!usenet
  3. From: bakerpa@aston.ac.uk (PA BAKER)
  4. Subject: Pointers to member functions.
  5. X-Nntp-Posting-Host: csproject2.aston.ac.uk
  6. Message-ID: <DMKL69.B2F@aston.ac.uk>
  7. Sender: usenet@aston.ac.uk
  8. Reply-To: bakerpa@aston.ac.uk
  9. Organization: Aston University
  10. Date: Sat, 10 Feb 1996 17:13:20 GMT
  11.  
  12. Hi there, a small problem that hopefully someone may be able to help with........
  13. I have a class window which inherits from all over the place etc....
  14. trying to get access to a member function read_data. This to enable the XView notifier to be set up 
  15. when a file can be read from.
  16.  
  17.  
  18. class Window
  19. {
  20. .......
  21. .......
  22. .......
  23. Notify_value read_data(Notify_client   client,register int  fd);
  24. void initalise_pipe(void);
  25. ......
  26. .......
  27. .......
  28. }
  29.  
  30.  
  31.  
  32. Window::read_data(notify_client client,register int fd)
  33. {
  34. ....
  35. ....
  36. ..
  37. }
  38.  
  39.  
  40. read_data is set up in initialise pipe by
  41. void
  42. Window::initialise_pipe()
  43. {
  44. ......
  45. ......
  46. ......
  47. //PMFI ptr = &NNG_Window_Group::read_data;
  48. notify_set_input_func(client1,(notify_value(*)(...))(this->read_data), fp);
  49. }
  50. The notify set input function needs a pointer to a function of type (notify_value*)(...) as can be seen above.
  51.  
  52. I have tried a whole load of stuff to get access to the member function i.e.
  53. Window::read_data
  54. settting a pointer to the function as above.
  55. etc,etc.
  56.  
  57. Any ideas.
  58.  
  59. Yours Desperately.
  60.  
  61. Paul Baker.
  62.  
  63.  
  64.  
  65.  
  66.